package org.ithang.application.charge.service;

import java.util.List;
import java.util.Map;
import org.ithang.application.charge.mapper.ChargeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.apache.log4j.Logger;
import org.ithang.tools.model.Pager;
import org.ithang.tools.database.ModelDao;
import org.ithang.application.charge.bean.Charge;

/**
 * 手续费营收记录 服务
 * @author zyt
 *
 */
@Service
public class ChargeService extends ModelDao<Charge>{

    @Autowired
    private ChargeMapper chargeMapper;

    private Logger logger = Logger.getLogger(ChargeService.class);
    
    public void add(Charge charge){
        chargeMapper.add(charge);
    }
    
    public Charge get(Long id){
        return chargeMapper.get(id);
    }
    
    public int delete(Long id){
        return chargeMapper.delete(id);
    }
    
    public int batchDelete(String[] ids){
    	return chargeMapper.batchDelete(ids);
    }
    
    public List<Charge> list(Long... ids){
    	return chargeMapper.list(ids);
    }
    
    public List<Charge> page(Pager<Charge> page){
    	return chargeMapper.page(page);
    }
    
    public List<Charge> query(Map<String,Object> conditions){
    	return chargeMapper.query(conditions);
    }
    
    public int update(Charge charge){
    	return chargeMapper.update(charge);
    }
    
    
}